<template>
	<view>
		<EZUIKitJs />
	</view>
</template>

<script>
	import EZUIKitJs from '@/components/EZUIKitJs.vue'
	export default {
		components: {
			EZUIKitJs
		},
		data() {
			return {

			};
		},
		onLoad(e) {
			console.log(e)
			let data = JSON.parse(e.data)
			console.log(data)
			this.getAddress(data.deviceSerial)
		},
		methods: {
			getAddress(deviceSerial) {
				uni.request({
					url: 'https://open.ys7.com/api/lapp/v2/live/address/get',
					method: 'post',
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					dataType: 'json',
					data: {
						accessToken: uni.getStorageInfoSync('accessToken'),
						deviceSerial:deviceSerial
					},
					success: (res) => {
						console.log('播放地址', res)
					}
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
